package com.micro.ai.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * Vben Admin 菜单 DTO
 * 符合 Vben Admin 框架标准的菜单格式
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@Schema(description = "Vben菜单DTO")
public class VbenMenuDTO {
    
    @Schema(description = "路由名称（Vue Router 必需，使用 PascalCase）", example = "System")
    private String name;
    
    @Schema(description = "路由路径", example = "/system")
    private String path;
    
    @Schema(description = "组件路径（去掉 views/ 和 .vue）", example = "/system/menu/index")
    private String component;
    
    @Schema(description = "重定向路径", example = "/system/user")
    private String redirect;
    
    @Schema(description = "路由元信息")
    private VbenMenuMeta meta;
    
    @Schema(description = "子菜单列表")
    private List<VbenMenuDTO> children;
    
    /**
     * Vben 菜单元信息
     */
    @Data
    @Schema(description = "Vben菜单元信息")
    public static class VbenMenuMeta {
        
        @Schema(description = "菜单标题（支持国际化key）", example = "系统管理")
        private String title;
        
        @Schema(description = "菜单图标", example = "lucide:settings")
        private String icon;
        
        @Schema(description = "排序值", example = "1")
        private Integer order;
        
        @Schema(description = "是否固定标签页", example = "false")
        private Boolean affixTab;
        
        @Schema(description = "是否缓存页面", example = "true")
        private Boolean keepAlive;
        
        @Schema(description = "是否隐藏菜单", example = "false")
        private Boolean hideInMenu;
        
        @Schema(description = "是否隐藏面包屑", example = "false")
        private Boolean hideInBreadcrumb;
        
        @Schema(description = "是否隐藏标签", example = "false")
        private Boolean hideInTab;
        
        @Schema(description = "激活的菜单路径")
        private String activePath;
        
        @Schema(description = "是否不需要基础布局（页面顶部和侧边栏）", example = "false")
        private Boolean noBasicLayout;
        
        @Schema(description = "外链地址")
        private String link;
        
        @Schema(description = "是否在新窗口打开", example = "false")
        private Boolean target;
        
        @Schema(description = "菜单可见但禁止访问", example = "false")
        private Boolean menuVisibleWithForbidden;
        
        @Schema(description = "其他自定义属性")
        private Map<String, Object> extra;
    }
}

